package com.ysstech.reportworld.service;

import com.ysstech.common.entity.TreeNode;
import com.ysstech.reportworld.entity.DataModular;
import com.ysstech.reportworld.entity.Modular;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 报表世界模块表 服务类
 * </p>
 *
 * @author lishuangliang
 * @since 2022-04-28
 */
public interface ModularService extends IService<Modular> {
    /**
     * 查询报表模块树信息
     *
     * @return
     */
    public List<TreeNode> queryModularTree() throws Exception;

    /**
     * 查询所有下级模块的模块集合
     *
     * @param id 模块编号
     * @return
     * @throws Exception
     */
    public List<Modular> queryListModular(String id) throws Exception;

    /**
     * 查询所有下级模块的模块id集合
     *
     * @param id
     * @return
     * @throws Exception
     */
    public List<String> queryModularIds(String id) throws Exception;


    /**
     * 获取报表模块信息
     *
     * @return
     * @throws Exception
     */
    public Map<String, Modular> getModularMap() throws Exception;

    /**
     * 添加模块信息
     *
     * @param modular
     * @throws Exception
     */
    public void addModular(Modular modular) throws Exception;
    /**
     * 修改模块信息
     *
     * @param modular
     * @throws Exception
     */
    public void editModular(Modular modular) throws Exception;
    /**
     * 删除模块信息
     *
     * @param id
     * @throws Exception
     */
    public void delModular(String id) throws Exception;
    /**
     * 获取模块对应表信息
     *
     * @return
     */
    public List<DataModular> getTableInfo(DataModular reportTableCustomer) throws Exception;

    /**
     * 模块数据的json
     */
    public String getModularJsonInfo() throws Exception;

}
